import os
os_uname = os.uname()
os_machine = os_uname.machine


def check_platform(platform):
    global os_machine
    if platform in os_machine:
        return True


def is_raspberry_pico_series():
    return check_platform("RP2")


def is_raspberry_picow_series():
    return check_platform("RP2")


def is_raspberry_pico():
    return check_platform("RP2040")


def is_raspberry_pico2():
    return check_platform("RP2350")


def is_esp32_series():
    return check_platform("ESP")


def is_esp8266():
    return check_platform("ESP8266")


def is_esp32():
    return check_platform("ESP32 module")


def is_esp32c3():
    return check_platform("ESP32C3")


def is_esp32s3():
    return check_platform("ESP32S3")

if __name__ == "__main__":
    print("is raspberry pico", is_raspberry_pico())
    print("is raspberry pico2", is_raspberry_pico2())
    print("is esp32 series: ", is_esp32_series())
    print("is esp32: ", is_esp8266())
    print("is esp32: ", is_esp32())
    print("is esp32c3: ", is_esp32c3())
    print("is esp32s3: ", is_esp32s3())
